package com.piggy.logi.sys.mapper;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.piggy.common.core.web.page.BaseMapperPlus;
import com.piggy.logi.sys.domain.LogiOrderGoodSource;

import java.util.List;

public interface LogiOrderGoodSourceMapper extends BaseMapperPlus<LogiOrderGoodSource> {

    default List<LogiOrderGoodSource> selectByGoodOrderIds(List<Long> goodOrderIds) {
        return selectList(Wrappers.<LogiOrderGoodSource>lambdaQuery().in(LogiOrderGoodSource::getGoodOrderId, goodOrderIds));
    }

    default void removeByGoodOrderId(Long goodOrderId) {
        delete(Wrappers.<LogiOrderGoodSource>lambdaQuery().eq(LogiOrderGoodSource::getGoodOrderId, goodOrderId));
    }
}
